(function () {
  new Vue({
    el: '#service_Config',
    data() {
      return {
        contact: [],
        selectList: [{
          name: '可见',
          code: 'Y'
        }, {
          name: '不可见',
          code: 'N'
        }],
      }
    },
    methods: {
      //获取配置字典
      getPZdict() {
        hlhttp.get({
          url: 'configure/dict',
          data: {
            module_code: 'CSTM_JWK',
            config_name: 'CSTM_JWK_PARK_SERVICE_CONTACTS_TYPE_CFG'
          },
          success: (res) => {
            res.map(item => {
              item.statusCode = [item.dictValue]
            })
            this.contact = res
          }
        })
      },
      // 选择类型
      handleClick(item) {
        console.log(item)
        hlhttp.put({
          url: 'configure/user_dict_config',
          data: {
            'module_code': 'CSTM_JWK',
            'config_name': 'CSTM_JWK_PARK_SERVICE_CONTACTS_TYPE_CFG',
            'dict_code': item.dictCode,
            'dict_name': item.dictName,
            'dict_value': item.statusCode + '',
            'dict_display_name': item.dictDisplayName,
            'dict_property': '#',
            'config_type': item.configType
          },
          success: (res) => {
            hl.toast('设置成功')
          }
        })
      }
    },
    mounted() {
      this.getPZdict()
    },
  })
}())